# Process this file with autoconf to produce a configure script.
# vim:set et ts=4:
#
# ibust-table - The Tables engine for IBust
#
# Copyright (c) 2008-2009 Yu Yuwei <acevery@gmail.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
#

m4_define([package_name], [ibust-table])
# if not 1, append datestamp to the version number.
m4_define([ibust_released], [1])
m4_define([ibust_major_version], [1])
m4_define([ibust_minor_version], [5])
m4_define([ibust_micro_version], [0])
m4_define(ibust_maybe_datestamp,
    m4_esyscmd([if test ]ibust_released[ != 1; then date +.%Y%m%d | tr -d '\n\r'; fi]))

m4_define([ibust_version],
    ibust_major_version.ibust_minor_version.ibust_micro_version[]ibust_maybe_datestamp)

AC_INIT([package_name], [ibust_version], [http://code.google.com/p/ibust/issues/entry], [package_name])
AM_INIT_AUTOMAKE([1.10])
AM_MAINTAINER_MODE
# AC_GNU_SOURCE

# AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])

#check python
AM_PATH_PYTHON([2.5])

# check for ibust
PKG_CHECK_MODULES([IBUST],[ibust-1.0 >= 1.1.0])

# define GETTEXT_* variables
GETTEXT_PACKAGE=ibust-table
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Define to the read-only architecture-independent data directory.])

AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_VERSION(0.16.1)

# OUTPUT files
AC_CONFIG_FILES([po/Makefile.in
    Makefile
    engine/Makefile
    engine/ibust-engine-table
    engine/ibust-table-createdb
    engine/table.xml.in
    data/Makefile
    icons/Makefile
    tables/Makefile
    m4/Makefile
    ibust-table.spec
    ibust-table.pc]
)

AC_OUTPUT

AC_MSG_RESULT([
Build options:
  Version                   $VERSION
  Install prefix            $prefix
])
